<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue</title>
    <style>
        div div {
            display: inline-flex;
        }
    </style>
</head>
<body>
<div id="app">
    <my-com1></my-com1>
</div>

<template id="tpl">
    <div>
        <h1>hello world</h1>
        <h4>22</h4>
    </div>
</template>

<script src="https://unpkg.com/vue/dist/vue.js"></script>

<script>

    Vue.component('myCom1', {
        template: '#tpl' // 指定模板id
    });

    var vm = new Vue({
        el: '#app',
        data: {

        },
        methods: {

        },
    });
</script>
</body>
</html>
